Added some jelly documentation for step for numbers#10983
Added some jelly documentation for step for numbers#10983StefanSpieker wants to merge 5 commits intojenkinsci:masterfrom
step for numbers#10983Conversation
NotMyFault
left a comment
There was a problem hiding this comment.
/label ready-for-merge
This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback.
Please see the merge process documentation for more information about the merge process.
Thanks!
daniel-beck
left a comment
There was a problem hiding this comment.
Added documentation seems to be an incorrect copy & paste.
| This will work only if @clazz is 'number', 'number-required', 'non-negative-number-required', | ||
| 'positive-number', 'positive-number-required'. |
There was a problem hiding this comment.
Why would that be the case? min and max are specifically supported by registerMinMaxValidator. step is only used by the browser's basic number spinner control. Nothing in Jenkins that I could find cares about this parameter.
There was a problem hiding this comment.
As step is passed to the input (as are min and max due to the morphtag) it would also be possible to use 0.1 for step (might not make sense to use non integer step values it in most places). But with a 0.1 step setting the validator would not work anymore as it expect integers.
But the step can definitely be used without any of the classes.
There was a problem hiding this comment.
it would also be possible to use
0.1forstep(might not make sense to use non integer step values it in most places).
This would contradict the below line, stating
If this value contains non-digit characters, it will not work.
Although it's unclear what would "not work", as there's nothing in Jenkins supporting this.
There was a problem hiding this comment.
When using any of the number classes then the step should be an integer. Otherwise the spinner of the input would change the field to non integer values.
But without the number classes a step of 0.1 works fine
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
|
Thanks a lot for the suggestions and explanations! |
|
Ideally we document that values for step other than integers only work when none of the validating classes like |
|
Can you suggest a text? I do not really understand what I should change. We are in a number.jelly file and I thought it is obvious that we are dealing with some kind of numbers. |
|
|
When I was working with jelly files I saw that step is not recognized in IntelliJ:

After this change, the documentation is shown:

Testing done
Only testing in IntelliJ
Proposed changelog entries
stepto jelly documentationProposed changelog category
/label developer
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered (see query).